.PP
[INTERACTIVE COMMANDS]
.SS calibrate
.PP
Usage: \f[C]calibrate\ <operation>\ [options]\f[]
.PP
Perform the specified transceiver calibration operation.
.PP
Available operations:
.IP \[bu] 2
LMS internal DC offset auto\-calibrations
.RS 2
.IP \[bu] 2
\f[C]calibrate\ lms\ [show]\f[]
.IP \[bu] 2
\f[C]calibrate\ lms\ tuning\ [value]\f[]
.IP \[bu] 2
\f[C]calibrate\ lms\ txlpf\ [<I\ filter>\ <Q\ filter>]\f[]
.IP \[bu] 2
\f[C]calibrate\ lms\ rxlpf\ [<I\ filter>\ <Q\ filter>]\f[]
.IP \[bu] 2
\f[C]calibrate\ lms\ rxvga2\ [<DC\ ref>\ <I1>\ <Q1>\ <I2>\ <Q2>]\f[]
.PP
Perform the specified auto\-calibration, or all of them if none are
provided.
When values are provided, these are used instead of the results of the
auto\-calibration procedure.
Use \f[C]lms\ show\f[] to read and print the current LMS calibration
values.
.PP
For \f[C]rxvga2\f[], \f[C]I1\f[] and \f[C]Q1\f[] are the Stage 1 I and Q
components respectively, and \f[C]I2\f[] and \f[C]Q2\f[] are the Stage 2
I and Q components.
.RE
.IP \[bu] 2
RX and TX I/Q DC offset correction parameter calibration
.RS 2
.IP \[bu] 2
\f[C]calibrate\ dc\ <rx|tx>\ [<I>\ <Q>]\f[]
.IP \[bu] 2
\f[C]calibrate\ dc\ <rxtx>\f[]
.PP
Calibrate the DC offset correction parameters for the current frequency
and gain settings.
If a I/Q values are provided, they are applied directly.
\f[C]cal\ rxtx\f[] is shorthand for \f[C]cal\ rx\f[] followed by
\f[C]cal\ tx\f[].
.RE
.IP \[bu] 2
RX and TX I/Q balance correction parameter calibration
.RS 2
.IP \[bu] 2
\f[C]calibrate\ iq\ <rx|tx>\ <gain|phase>\ <value>\f[]
.PP
Set the specified IQ gain or phase balance parameters.
.RE
.IP \[bu] 2
Generate RX or TX I/Q DC correction parameter tables
.RS 2
.IP \[bu] 2
\f[C]calibrate\ table\ dc\ <rx|tx>\ [<f_min>\ <f_max>\ [f_inc]]\f[]
.PP
Generate and write an I/Q correction parameter table to the current
working directory, in a file named \f[C]<serial>_dc_<rx|tx>.tbl\f[].
\f[C]f_min\f[] and \f[C]f_max\f[] are min and max frequencies to include
in the table.
\f[C]f_inc\f[] is the frequency increment.
.PP
By default, tables are generated over the entire frequency range, in 10
MHz steps.
.RE
.SS clear
.PP
Usage: \f[C]clear\f[]
.PP
Clears the screen.
.SS echo
.PP
Usage: \f[C]echo\ [arg\ 1]\ [arg\ 2]\ ...\ [arg\ n]\f[]
.PP
Echo each argument on a new line.
.SS erase
.PP
Usage: \f[C]erase\ <offset>\ <count>\f[]
.PP
Erase specified erase blocks SPI flash.
.IP \[bu] 2
\f[C]<offset>\f[] \- Erase block offset
.IP \[bu] 2
\f[C]<count>\f[] \- Number of erase blocks to erase
.SS flash_backup
.PP
Usage: \f[C]flash_backup\ <file>\ (<type>\ |\ <address>\ <length>)\f[]
.PP
Back up flash data to the specified file.
This command takes either two or four arguments.
The two\-argument invocation is generally recommended for
non\-development use.
.PP
Parameters:
.IP \[bu] 2
\f[C]<type>\f[] \- Type of backup.
.RS 2
.PP
This selects the appropriate address and length values based upon the
selected type.
.PP
Valid options are:
.PP
.TS
tab(@);
rw(11.7n) lw(52.5n).
T{
Option
T}@T{
Description
T}
_
T{
\f[C]cal\f[]
T}@T{
Calibration data
T}
T{
\f[C]fw\f[]
T}@T{
Firmware
T}
T{
\f[C]fpga40\f[]
T}@T{
Metadata and bitstream for 40 kLE FPGA
T}
T{
\f[C]fpga115\f[]
T}@T{
Metadata and bitstream for 115 kLE FPGA
T}
.TE
.RE
.IP \[bu] 2
\f[C]<address>\f[] \- Address of data to back up.
Must be erase block\-aligned.
.IP \[bu] 2
\f[C]<len>\f[] \- Length of region to back up.
Must be erase block\-aligned.
.PP
Note: When an address and length are provided, the image type will
default to \f[C]raw\f[].
.PP
Examples:
.IP \[bu] 2
\f[C]flash_backup\ cal.bin\ cal\f[]
.RS 2
.PP
Backs up the calibration data region.
.RE
.IP \[bu] 2
\f[C]flash_backup\ cal_raw.bin\ 0x30000\ 0x10000\f[]
.RS 2
.PP
Backs up the calibration region as a raw data image.
.RE
.SS flash_image
.PP
Usage: \f[C]flash_image\ <image>\ [output\ options]\f[]
.PP
Print a flash image\[aq]s metadata or create a new flash image.
When provided with the name of a flash image file as the only argument,
this command will print the metadata contents of the image.
.PP
The following options may be used to create a new flash image.
.IP \[bu] 2
\f[C]data=<file>\f[]
.RS 2
.PP
File to containing data to store in the image.
.RE
.IP \[bu] 2
\f[C]address=<addr>\f[]
.RS 2
.PP
Flash address.
The default depends upon \f[C]type\f[] parameter.
.RE
.IP \[bu] 2
\f[C]type=<type>\f[]
.RS 2
.PP
Type of flash image.
Defaults to \f[C]raw\f[].
.PP
Valid options are:
.PP
.TS
tab(@);
rw(11.7n) lw(52.5n).
T{
Option
T}@T{
Description
T}
_
T{
\f[C]cal\f[]
T}@T{
Calibration data
T}
T{
\f[C]fw\f[]
T}@T{
Firmware
T}
T{
\f[C]fpga40\f[]
T}@T{
Metadata and bitstream for 40 kLE FPGA
T}
T{
\f[C]fpga115\f[]
T}@T{
Metadata and bitstream for 115 kLE FPGA
T}
T{
\f[C]raw\f[]
T}@T{
Raw data.
The address and length parameters must be provided if this type is
selected.
T}
.TE
.RE
.IP \[bu] 2
\f[C]serial=<serial>\f[]
.RS 2
.PP
Serial # to store in image.
Defaults to zeros.
.RE
.SS flash_init_cal
.PP
Usage:
\f[C]flash_init_cal\ <fpga_size>\ <vctcxo_trim>\ [<output_file>]\f[]
.PP
Create and write a new calibration data region to the currently opened
device, or to a file.
Be sure to back up calibration data prior to running this command.
(See the \f[C]flash_backup\f[] command.)
.IP \[bu] 2
\f[C]<fpga_size>\f[]
.RS 2
.PP
Either 40 or 115, depending on the device model.
.RE
.IP \[bu] 2
\f[C]<vctcxo_trim>\f[]
.RS 2
.PP
VCTCXO/DAC trim value (\f[C]0x0\f[]\-\f[C]0xffff\f[])
.RE
.IP \[bu] 2
\f[C]<output_file>\f[]
.RS 2
.PP
File to write calibration data to.
When this argument is provided, no data will be written to the
device\[aq]s flash.
.RE
.SS flash_restore
.PP
Usage: \f[C]flash_restore\ <file>\ [<address>\ <length>]\f[]
.PP
Restore flash data from a file, optionally overriding values in the
image metadata.
.IP \[bu] 2
\f[C]<address>\f[]
.RS 2
.PP
Defaults to the address specified in the provided flash image file.
.RE
.IP \[bu] 2
\f[C]<length>\f[]
.RS 2
.PP
Defaults to length of the data in the provided image file.
.RE
.SS fw_log
.PP
Usage: \f[C]fw_log\f[] [filename]
.PP
Read the contents of the device\[aq]s firmware log and write it to the
specified file.
If no filename is specified, the log content is written to stdout.
.SS help
.PP
Usage: \f[C]help\ [<command>]\f[]
.PP
Provides extended help, like this, on any command.
.SS info
.PP
Usage: \f[C]info\f[]
.PP
Prints the following information about an opened device:
.IP \[bu] 2
Serial number
.IP \[bu] 2
VCTCXO DAC calibration value
.IP \[bu] 2
FPGA size
.IP \[bu] 2
Whether or not the FPGA is loaded
.IP \[bu] 2
USB bus, address, and speed
.IP \[bu] 2
Backend (Denotes which device interface code is being used.)
.IP \[bu] 2
Instance number
.SS jump_to_boot
.PP
Usage: \f[C]jump_to_boot\f[]
.PP
Clear out a FW signature word in flash and jump to FX3 bootloader.
.PP
The device will continue to boot into the FX3 bootloader across power
cycles until new firmware is written to the device.
.SS load
.PP
Usage: \f[C]load\ <fpga|fx3>\ <filename>\f[]
.PP
Load an FPGA bitstream or program the FX3\[aq]s SPI flash.
.SS xb
.PP
Usage: \f[C]xb\ <board_model>\ <subcommand>\ [parameters]\f[]
.PP
Enable or configure an expansion board.
.PP
Valid values for \f[C]board_model\f[]:
.IP \[bu] 2
\f[C]100\f[]
.RS 2
.PP
XB\-100 GPIO expansion board
.RE
.IP \[bu] 2
\f[C]200\f[]
.RS 2
.PP
XB\-200 LF/MF/HF/VHF transverter expansion board
.RE
.IP \[bu] 2
\f[C]300\f[]
.RS 2
.PP
XB\-300 amplifier board
.RE
.PP
Common subcommands:
.IP \[bu] 2
\f[C]enable\f[]
.RS 2
.PP
Enable the XB\-100, XB\-200, or XB\-300 expansion board.
.RE
.PP
XB\-200 subcommands:
.IP \[bu] 2
\f[C]filter\ [rx|tx]\ [50|144|222|custom|auto_1db|auto_3db]\f[]
.RS 2
.PP
Selects the specified RX or TX filter on the XB\-200 board.
Below are descriptions of each of the filter options.
.IP \[bu] 2
50
.RS 2
.IP
.nf
\f[C]
Select\ the\ 50\-54\ MHz\ (6\ meter\ band)\ filter.
\f[]
.fi
.RE
.IP \[bu] 2
144
.RS 2
.IP
.nf
\f[C]
Select\ the\ 144\-148\ MHz\ (2\ meter\ band)\ filter.
\f[]
.fi
.RE
.IP \[bu] 2
222
.RS 2
.IP
.nf
\f[C]
Select\ the\ 222\-225\ MHz\ (1.25\ meter\ band)\ filter.\ Realistically,
this\ filter\ option\ is\ actually\ slightly\ wider,\ covering
206\ MHz\ \-\ 235\ MHz.
\f[]
.fi
.RE
.IP \[bu] 2
custom
.RS 2
.IP
.nf
\f[C]
Selects\ the\ custom\ filter\ path.\ The\ user\ should\ connect\ a\ filter
along\ the\ corresponding\ FILT\ and\ FILT\-ANT\ connections\ when\ using
this\ option.\ \ Alternatively\ one\ may\ jumper\ the\ FILT\ and\ FILT\-ANT
connections\ to\ achieve\ "no\ filter"\ for\ reception.\ (However,\ this\ is
_highly_\ discouraged\ for\ transmissions.)
\f[]
.fi
.RE
.IP \[bu] 2
auto_1db
.RS 2
.IP
.nf
\f[C]
Automatically\ selects\ one\ of\ the\ above\ choices\ based\ upon\ frequency
and\ the\ filters\[aq]\ 1dB\ points.\ The\ custom\ path\ is\ used\ for\ cases
that\ are\ not\ associated\ with\ the\ on\-board\ filters.
\f[]
.fi
.RE
.IP \[bu] 2
auto_3db
.RS 2
.IP
.nf
\f[C]
Automatically\ selects\ one\ of\ the\ above\ choices\ based\ upon\ frequency
and\ the\ filters\[aq]\ 3dB\ points.\ The\ custom\ path\ is\ used\ for\ cases
that\ are\ not\ associated\ with\ the\ on\-board\ filters.
\f[]
.fi
.RE
.RE
.PP
XB\-300 subcommands:
.IP \[bu] 2
\f[C]<pa|lna|aux>\ [on|off]\f[]
.RS 2
.PP
Enable or disable the power amplifier (PA), low\-noise amplifier (lna)
or auxillary LNA (aux).
The current state if the specified device is printed if [on|off] is not
specified.
.PP
Note: The auxillary path on the XB\-300 is not populated with components
by default; the \f[C]aux\f[] control will have no effect upon the RX
signal.
This option is available for users to modify their board with custom
hardware.
.RE
.IP \[bu] 2
\f[C]<pwr>\f[]
.RS 2
.PP
Read the current Power Detect (PDET) voltage and compute the output
power.
.RE
.IP \[bu] 2
\f[C]trx\ <rx|tx>\f[]
.RS 2
.PP
The default XB\-300 hardware configuration includes separate RX and TX
paths.
However, users wishing to use only a single antenna for TRX can do so
via a modification to resistor population options on the XB\-300 and use
this command to switch between RX an TX operation.
(See R8, R10, and R23 on the schematic.)
.RE
.PP
Examples:
.IP \[bu] 2
\f[C]xb\ 200\ enable\f[]
.RS 2
.PP
Enables and configures the XB\-200 transverter expansion board.
.RE
.IP \[bu] 2
\f[C]xb\ 200\ filter\ rx\ 144\f[]
.RS 2
.PP
Selects the 144\-148 MHz receive filter on the XB\-200 transverter
expansion board.
.RE
.IP \[bu] 2
\f[C]xb\ 300\ enable\f[]
.RS 2
.PP
Enables and configures the use of GPIOs to interact with the XB\-300.
The PA and LNA will disabled by default.
.RE
.IP \[bu] 2
\f[C]xb\ 300\ lna\ on\f[]
.RS 2
.PP
Enables the RX LNA on the XB\-300.
LED D1 (green) is illuminated when the LNA is enabled, and off when it
is disabled.
.RE
.IP \[bu] 2
\f[C]xb\ 300\ pa\ off\f[]
.RS 2
.PP
Disables the TX PA on the XB\-300.
LED D2 (blue) is illuminated when the PA is enabled, and off when it is
disabled.
.RE
.SS mimo
.PP
Usage: \f[C]mimo\ [master\ |\ slave]\f[]
.PP
Modify device MIMO operation.
.PP
IMPORTANT: This command is deprecated and has been superseded by
\f[C]"print/set\ smb_mode"\f[].
For usage text, run: "\f[C]set\ smb_mode\f[]"
.SS open
.PP
Usage: \f[C]open\ [device\ identifiers]\f[]
.PP
Open the specified device for use with successive commands.
Any previously opened device will be closed.
.PP
The general form of the device identifier string is:
.PP
\f[C]<backend>:[device=<bus>:<addr>]\ [instance=<n>]\ [serial=<serial>]\f[]
.PP
See the \f[C]bladerf_open()\f[] documentation in libbladeRF for the
complete device specifier format.
.SS peek
.PP
Usage: \f[C]peek\ <dac|lms|si>\ <address>\ [num_addresses]\f[]
.PP
The peek command can read any of the devices hanging off the FPGA which
includes the LMS6002D transceiver, VCTCXO trim DAC or the Si5338 clock
generator chip.
.PP
If \f[C]num_addresses\f[] is supplied, the address is incremented by 1
and another peek is performed for that many addresses.
.PP
Valid Address Ranges:
.PP
.TS
tab(@);
r l.
T{
Device
T}@T{
Address Range
T}
_
T{
\f[C]dac\f[]
T}@T{
0 to 255
T}
T{
\f[C]lms\f[]
T}@T{
0 to 127
T}
T{
\f[C]si\f[]
T}@T{
0 to 255
T}
.TE
.PP
Example:
.IP \[bu] 2
\f[C]peek\ si\ ...\f[]
.SS poke
.PP
Usage: \f[C]poke\ <dac|lms|si>\ <address>\ <data>\f[]
.PP
The poke command can write any of the devices hanging off the FPGA which
includes the LMS6002D transceiver, VCTCXO trim DAC or the Si5338 clock
generator chip.
.PP
Valid Address Ranges:
.PP
.TS
tab(@);
r l.
T{
Device
T}@T{
Address Range
T}
_
T{
\f[C]dac\f[]
T}@T{
0 to 255
T}
T{
\f[C]lms\f[]
T}@T{
0 to 127
T}
T{
\f[C]si\f[]
T}@T{
0 to 255
T}
.TE
.PP
Example:
.IP \[bu] 2
\f[C]poke\ lms\ ...\f[]
.SS print
.PP
Usage: \f[C]print\ [parameter]\f[]
.PP
The print command takes a parameter to print.
Available parameters are listed below.
If no paremeter is specified, all parameters are printed.
.PP
.TS
tab(@);
rw(13.6n) lw(54.4n).
T{
Parameter
T}@T{
Description
T}
_
T{
\f[C]bandwidth\f[]
T}@T{
Bandwidth settings
T}
T{
\f[C]frequency\f[]
T}@T{
Frequency settings
T}
T{
\f[C]gpio\f[]
T}@T{
FX3 <\-> FPGA GPIO state
T}
T{
\f[C]loopback\f[]
T}@T{
Loopback settings
T}
T{
\f[C]lnagain\f[]
T}@T{
Gain setting of the RX LNA, in dB
T}
T{
\f[C]rx_mux\f[]
T}@T{
FPGA RX FIFO input mux setting
T}
T{
\f[C]rxvga1\f[]
T}@T{
Gain setting of RXVGA1, in dB
T}
T{
\f[C]rxvga2\f[]
T}@T{
Gain setting of RXVGA2, in dB
T}
T{
\f[C]txvga1\f[]
T}@T{
Gain setting of TXVGA1, in dB
T}
T{
\f[C]txvga2\f[]
T}@T{
Gain setting of TXVGA2, in dB
T}
T{
\f[C]sampling\f[]
T}@T{
External or internal sampling mode
T}
T{
\f[C]samplerate\f[]
T}@T{
Samplerate settings
T}
T{
\f[C]smb_mode\f[]
T}@T{
SMB clock port mode of operation
T}
T{
\f[C]trimdac\f[]
T}@T{
VCTCXO Trim DAC settings
T}
T{
\f[C]vctcxo_tamer\f[]
T}@T{
Current VCTCXO tamer mode.
T}
T{
\f[C]xb_gpio\f[]
T}@T{
Expansion board GPIO values
T}
T{
\f[C]xb_gpio_dir\f[]
T}@T{
Expansion board GPIO direction (1=output, 0=input)
T}
.TE
.SS probe
.PP
Usage: \f[C]probe\ [strict]\f[]
.PP
Search for attached bladeRF device and print a list of results.
.PP
Without specifying \f[C]strict\f[], the lack of any available devices is
not considered an error.
.PP
When provided the optional \f[C]strict\f[] argument, this command will
treat the situation where no devices are found as an error, causing
scripts or lists of commands provided via the \f[C]\-e\f[] command line
argument to terminate immediately.
.SS quit
.PP
Usage: \f[C]quit\f[]
.PP
Exit the CLI.
.SS recover
.PP
Usage: \f[C]recover\ [<bus>\ <address>\ <firmware\ file>]\f[]
.PP
Load firmware onto a device running in bootloader mode, or list all
devices currently in bootloader mode.
.PP
With no arguments, this command lists the USB bus and address for
FX3\-based devices running in bootloader mode.
.PP
When provided a bus, address, and path to a firmware file, the specified
device will be loaded with and begin executing the provided firmware.
.PP
In most cases, after successfully loading firmware into the device\[aq]s
RAM, users should open the device with the "\f[C]open\f[]" command, and
write the firmware to flash via "\f[C]load\ fx3\ <firmware\ file>\f[]"
.SS run
.PP
Usage: \f[C]run\ <script>\f[]
.PP
Run the provided script.
.SS rx
.PP
Usage:
\f[C]rx\ <start\ |\ stop\ |\ wait\ |\ config\ [param=val\ [param=val\ [...]]>\f[]
.PP
Receive IQ samples and write them to the specified file.
Reception is controlled and configured by one of the following:
.PP
.TS
tab(@);
rw(11.7n) lw(56.4n).
T{
Command
T}@T{
Description
T}
_
T{
\f[C]start\f[]
T}@T{
Start receiving samples
T}
T{
\f[C]stop\f[]
T}@T{
Stop receiving samples
T}
T{
\f[C]wait\f[]
T}@T{
Wait for sample transmission to complete, or until a specified amount of
time elapses
T}
T{
\f[C]config\f[]
T}@T{
Configure sample reception.
If no parameters are provided, the current parameters are printed.
T}
.TE
.PP
Running \f[C]rx\f[] without any additional commands is valid shorthand
for \f[C]rx\ config\f[].
.PP
The \f[C]wait\f[] command takes an optional \f[C]timeout\f[] parameter.
This parameter defaults to units of milliseconds (\f[C]ms\f[]).
The timeout unit may be specified using the \f[C]ms\f[] or \f[C]s\f[]
suffixes.
If this parameter is not provided, the command will wait until the
reception completes or \f[C]Ctrl\-C\f[] is pressed.
.PP
Configuration parameters take the form \f[C]param=value\f[], and may be
specified in a single or multiple \f[C]rx\ config\f[] invocations.
Below is a list of available parameters.
.PP
.TS
tab(@);
rw(15.6n) lw(52.5n).
T{
Parameter
T}@T{
Description
T}
_
T{
\f[C]n\f[]
T}@T{
Number of samples to receive.
0 = inf.
T}
T{
\f[C]file\f[]
T}@T{
Filename to write received samples to
T}
T{
\f[C]format\f[]
T}@T{
Output file format.
One of the following:
T}
T{
T}@T{
\f[C]csv\f[]: CSV of SC16 Q11 samples
T}
T{
T}@T{
\f[C]bin\f[]: Raw SC16 Q11 DAC samples
T}
T{
\f[C]samples\f[]
T}@T{
Number of samples per buffer to use in the asynchronous stream.
Must be divisible by 1024 and >= 1024.
T}
T{
\f[C]buffers\f[]
T}@T{
Number of sample buffers to use in the asynchronous stream.
The min value is 4.
T}
T{
\f[C]xfers\f[]
T}@T{
Number of simultaneous transfers to allow the asynchronous stream to
use.
This should be less than the \f[C]buffers\f[] parameter.
T}
T{
\f[C]timeout\f[]
T}@T{
Data stream timeout.
With no suffix, the default unit is \f[C]ms\f[].
The default value is 1000 ms (1 s).
Valid suffixes are \f[C]ms\f[] and \f[C]s\f[].
T}
.TE
.PP
Example:
.IP \[bu] 2
\f[C]rx\ config\ file=/tmp/data.bin\ format=bin\ n=10K\f[]
.RS 2
.PP
Receive (10240 = 10 * 1024) samples, writing them to
\f[C]/tmp/data.bin\f[] in the binary DAC format.
.RE
.PP
Notes:
.IP \[bu] 2
The \f[C]n\f[], \f[C]samples\f[], \f[C]buffers\f[], and \f[C]xfers\f[]
parameters support the suffixes \f[C]K\f[], \f[C]M\f[], and \f[C]G\f[],
which are multiples of 1024.
.IP \[bu] 2
An \f[C]rx\ stop\f[] followed by an \f[C]rx\ start\f[] will result in
the samples file being truncated.
If this is not desired, be sure to run \f[C]rx\ config\f[] to set
another file before restarting the rx stream.
.IP \[bu] 2
For higher sample rates, it is advised that the \f[C]bin\f[]ary output
format be used, and the output file be written to RAM (e.g.
\f[C]/tmp\f[], \f[C]/dev/shm\f[]), if space allows.
For larger captures at higher sample rates, consider using an SSD
instead of a HDD.
.SS trigger
.PP
Usage:
\f[C]trigger\ [<trigger>\ <tx\ |\ rx>\ [<off\ slave\ master\ fire>]]\f[]
.PP
If used without parameters, this command prints the state of all
triggers.
When aand and supplied, the specified trigger is printed.
.PP
Below are the available options for :
.PP
.TS
tab(@);
rw(11.7n) lw(56.4n).
T{
Trigger
T}@T{
Description
T}
_
T{
\f[C]J71\-4\f[]
T}@T{
Trigger signal is on \f[C]mini_exp1\f[] (J71, pin 4).
T}
.TE
.PP
The trigger is controlled and configured by providing the last argument,
which may be one of the following:
.PP
.TS
tab(@);
rw(11.7n) lw(56.4n).
T{
Command
T}@T{
Description
T}
_
T{
\f[C]off\f[]
T}@T{
Clears fire request and disables trigger functionality.
T}
T{
\f[C]slave\f[]
T}@T{
Configures trigger as slave, clears fire request, and arms the device.
T}
T{
\f[C]master\f[]
T}@T{
Configures trigger as master, clears fire request, and arms the device.
T}
T{
\f[C]fire\f[]
T}@T{
Sets fire request.
Only applicable to the master.
T}
.TE
.PP
A trigger chain consists of a single or multiple bladeRF units and may
contain TX and RX modules.
If multiple bladeRF units are used they need to be connected via the
signal specified by and a common ground.
.PP
The following sequence of commands should be used to ensure proper
synchronization.
It is assumed that all triggers are off initially.
.IP "1." 3
Configure designated trigger master
.RS 4
.PP
\f[B]IMPORTANT\f[]
.IP
.nf
\f[C]
Never\ configure\ two\ devices\ as\ trigger\ masters\ on\ a\ single\ chain.
Contention\ on\ the\ same\ signal\ could\ damage\ the\ devices.
\f[]
.fi
.RE
.IP "2." 3
Configure all other devices as trigger slaves
.IP "3." 3
Configure and start transmit or receive streams.
.RS 4
.IP
.nf
\f[C]
The\ operation\ will\ stall\ until\ the\ triggers\ fire.\ As\ such,\ sufficiently
large\ timeouts\ should\ be\ used\ to\ allow\ the\ trigger\ signal\ to\ be\ emitted
by\ the\ master\ and\ received\ by\ the\ slaves\ prior\ to\ libbladeRF\ returning
BLADERF_ERR_TIMEOUT.
\f[]
.fi
.RE
.IP "4." 3
Set fire\-request on master trigger
.RS 4
.IP
.nf
\f[C]
All\ devices\ will\ synchronously\ start\ transmitting\ or\ receiving\ data.
\f[]
.fi
.RE
.IP "5." 3
Finish the transmit and receive tasks as usual
.IP "6." 3
Re\-configure the master and slaves to clear fire requests and re\-arm.
.RS 4
.IP
.nf
\f[C]
Steps\ 1\ through\ 5\ may\ be\ repeated\ as\ neccessary.
\f[]
.fi
.RE
.IP "7." 3
Disable triggering on all slaves
.IP "8." 3
Disable triggering on master
.PP
Notes:
.IP \[bu] 2
Synchronizing transmitters and receivers on a single chain will cause an
offset of 11 samples between TX and RX; these samples should be
discarded.
This is caused by different processing pipeline lengths of TX and RX.
This value might change if the FPGA code is updated in the future.
.SS tx
.PP
Usage: \f[C]tx\ <start\ |\ stop\ |\ wait\ |\ config\ [parameters]>\f[]
.PP
Read IQ samples from the specified file and transmit them.
Transmission is controlled and configured by one of the following:
.PP
.TS
tab(@);
rw(11.7n) lw(56.4n).
T{
Command
T}@T{
Description
T}
_
T{
\f[C]start\f[]
T}@T{
Start transmitting samples
T}
T{
\f[C]stop\f[]
T}@T{
Stop transmitting samples
T}
T{
\f[C]wait\f[]
T}@T{
Wait for sample transmission to complete, or until a specified amount of
time elapses
T}
T{
\f[C]config\f[]
T}@T{
Configure sample transmission.
If no parameters are provided, the current parameters are printed.
T}
.TE
.PP
Running \f[C]tx\f[] without any additional commands is valid shorthand
for \f[C]tx\ config\f[].
.PP
The \f[C]wait\f[] command takes an optional \f[C]timeout\f[] parameter.
This parameter defaults to units of milliseconds (\f[C]ms\f[]).
The timeout unit may be specified using the \f[C]ms\f[] or \f[C]s\f[]
suffixes.
If this parameter is not provided, the command will wait until the
transmission completes or \f[C]Ctrl\-C\f[] is pressed.
.PP
Configuration parameters take the form \f[C]param=value\f[], and may be
specified in a single or multiple \f[C]tx\ config\f[] invocations.
Below is a list of available parameters.
.PP
.TS
tab(@);
rw(15.6n) lw(52.5n).
T{
Parameter
T}@T{
Description
T}
_
T{
\f[C]file\f[]
T}@T{
Filename to read samples from
T}
T{
\f[C]format\f[]
T}@T{
Input file format.
One of the following:
T}
T{
T}@T{
\f[C]csv\f[]: CSV of SC16 Q11 samples ([\-2048, 2047])
T}
T{
T}@T{
\f[C]bin\f[]: Raw SC16 Q11 DAC samples ([\-2048, 2047])
T}
T{
\f[C]repeat\f[]
T}@T{
The number of times the file contents should be transmitted.
0 implies repeat until stopped.
T}
T{
\f[C]delay\f[]
T}@T{
The number of microseconds to delay between retransmitting file
contents.
0 implies no delay.
T}
T{
\f[C]samples\f[]
T}@T{
Number of samples per buffer to use in the asynchronous stream.
Must be divisible by 1024 and >= 1024.
T}
T{
\f[C]buffers\f[]
T}@T{
Number of sample buffers to use in the asynchronous stream.
The min value is 4.
T}
T{
\f[C]xfers\f[]
T}@T{
Number of simultaneous transfers to allow the asynchronous stream to
use.
This should be < the \f[C]buffers\f[] parameter.
T}
T{
\f[C]timeout\f[]
T}@T{
Data stream timeout.
With no suffix, the default unit is ms.
The default value is 1000 ms (1 s).
Valid suffixes are \[aq]ms\[aq] and \[aq]s\[aq].
T}
.TE
.PP
Example:
.IP \[bu] 2
\f[C]tx\ config\ file=data.bin\ format=bin\ repeat=2\ delay=250000\f[]
.RS 2
.PP
Transmitting the contents of \f[C]data.bin\f[] two times, with a ~250ms
delay between transmissions.
.RE
.PP
Notes:
.IP \[bu] 2
The \f[C]n\f[], \f[C]samples\f[], \f[C]buffers\f[], and \f[C]xfers\f[]
parameters support the suffixes \f[C]K\f[], \f[C]M\f[], and \f[C]G\f[],
which are multiples of 1024.
.IP \[bu] 2
For higher sample rates, it is advised that the input file be stored in
RAM (e.g.
\f[C]/tmp\f[], \f[C]/dev/shm\f[]) or on an SSD, rather than a HDD.
.IP \[bu] 2
When providing CSV data, this command will first convert it to a binary
format, stored in a file in the current working directory.
During this process, out\-of\-range values will be clamped.
.IP \[bu] 2
When using a binary format, the user is responsible for ensuring that
the provided data values are within the allowed range.
This prerequisite alleviates the need for this program to perform range
checks in time\-sensitive callbacks.
.SS set
.PP
Usage: \f[C]set\ <parameter>\ <arguments>\f[]
.PP
The set command takes a parameter and an arbitrary number of arguments
for that particular parameter.
The parameter is one of:
.PP
.TS
tab(@);
rw(13.6n) lw(54.4n).
T{
Parameter
T}@T{
Description
T}
_
T{
\f[C]bandwidth\f[]
T}@T{
Bandwidth settings
T}
T{
\f[C]frequency\f[]
T}@T{
Frequency settings
T}
T{
\f[C]gpio\f[]
T}@T{
FX3 <\-> FPGA GPIO state
T}
T{
\f[C]loopback\f[]
T}@T{
Loopback settings.
Run \[aq]set loopback\[aq] to list modes.
T}
T{
\f[C]lnagain\f[]
T}@T{
Gain setting of the RX LNA, in dB.
Values: 0, 3, 6
T}
T{
\f[C]rxvga1\f[]
T}@T{
Gain setting of RXVGA1, in dB.
Range: [5, 30]
T}
T{
\f[C]rx_mux\f[]
T}@T{
FPGA RX FIFO input mux mode.
Options are: BASEBAND_LMS, 12BIT_COUNTER, 32BIT_COUNTER,
DIGITAL_LOOPBACK
T}
T{
\f[C]rxvga1\f[]
T}@T{
Gain setting of RXVGA1, in dB.
Range: [5, 30]
T}
T{
\f[C]rxvga2\f[]
T}@T{
Gain setting of RXVGA2, in dB.
Range: [0, 30]
T}
T{
\f[C]txvga1\f[]
T}@T{
Gain setting of TXVGA1, in dB.
Range: [\-35, \-4]
T}
T{
\f[C]txvga2\f[]
T}@T{
Gain setting of TXVGA2, in dB.
Range: [0, 25]
T}
T{
\f[C]sampling\f[]
T}@T{
External or internal sampling mode
T}
T{
\f[C]samplerate\f[]
T}@T{
Sample rate settings
T}
T{
\f[C]smb_mode\f[]
T}@T{
SMB clock port mode of operation
T}
T{
\f[C]trimdac\f[]
T}@T{
VCTCXO trim DAC settings
T}
T{
\f[C]vctcxo_tamer\f[]
T}@T{
VCTCXO tamer mode.
Options: Disabled, 1PPS, 10MHz
T}
T{
\f[C]xb_gpio\f[]
T}@T{
Expansion board GPIO values
T}
T{
\f[C]xb_gpio_dir\f[]
T}@T{
Expansion board GPIO direction (1=output, 0=input)
T}
.TE
.SS version
.PP
Usage: \f[C]version\f[]
.PP
Prints version information for host software and the current device.
